package org.zsl.entity;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CustomerTestor {

    @Test
    public  void getNewCustomer(){

         Customer customer = new Customer();
         System.out.println(customer);
    }



    @Test
    public  void getNewCustomerBySpring(){

        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");

       Customer customer= (Customer) context.getBean("customer2");

        System.out.println(customer.getName());
    }

}
